package com.cheng.spring04.controller;

import com.cheng.spring04.service.BookService;
import org.springframework.stereotype.Controller;

@Controller
public class BookController {
    private final BookService bookService;

    public BookController(BookService bookService) {
        this.bookService = bookService;
    }

    public void buyBookByBookIdAndUserId(int bookId, int userId, int num) {
        bookService.buyBook(bookId, userId, num);
    }
}
